//
// Created by LiuYou on 2021/5/12.
//

/*
 * 大小和容量
 *      size()
 *      capacity()
 *      empty() 跟size()有关
 *      reserve() 注意 只大不小 跟capacity()有关。
 *
 */
#include <vector>
#include <iostream>
#include "Book.hpp"


int main() {
    std::vector<Book> vec;
    vec.reserve(100);
    std::cout << "vec.capacity(): " << vec.capacity() << std::endl;
    std::cout << "vec.size(): " << vec.size() << std::endl;
    vec.reserve(10);
    std::cout << "vec.capacity(): " << vec.capacity() << std::endl;
    std::cout << "vec.size(): " << vec.size() << std::endl;
    vec.reserve(1000);
    std::cout << "vec.capacity(): " << vec.capacity() << std::endl;
    std::cout << "vec.size(): " << vec.size() << std::endl;
//    vec.reserve(vec.max_size());
    std::cout << "vec.max_size(): " << vec.max_size() << std::endl;
    std::cout << "vec.capacity(): " << vec.capacity() << std::endl;
    std::cout << "vec.size(): " << vec.size() << std::endl;


    return 0;
}
